﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="~/css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./css/aui.css" />
    <style type="text/css">
        .header {
            padding: 2.5rem 0.5rem 2rem 0.5rem;
        }
    </style>
</head>
<body>
    <header class="aui-bar aui-bar-nav aui-text-left header" id="header">
        <br />
        <h1> <a class="aui-btn aui-pull-right" tapmode="tapmode" onClick="openClub()"> <em class="aui-iconfont aui-icon-calendar"></em></a>管理医生信息</h1>
    </header>
    <div class="aui-content aui-margin-b-15">
        <ul class="aui-list aui-form-list">
            <li class="aui-list-header">点击对应科室可切换类目查看</li>
            <div class="aui-tab" id="tab">
                <div id="item1" class="aui-tab-item aui-active" onClick="itemclick(1)">所有科室</div>
                <div id="item2" class="aui-tab-item" onClick="itemclick(2)">外科</div>
                <div id="item3" class="aui-tab-item" onClick="itemclick(3)">内科</div>
                <div id="item4" class="aui-tab-item" onClick="itemclick(4)">儿科</div>
                <div id="item5" class="aui-tab-item" onClick="itemclick(5)">骨科</div>
            </div>
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-label">
                        医生名称
                    </div>
                    <div class="aui-list-item-label">所属科室</div>


                </div>
            </li>
            @model IEnumerable<Weekdbo>
            @foreach (var item in Model)
            {
                <a href="/Admin/UpdateDoctor2?id=@item.id">
                    <li class="aui-list-item aui-list-item-arrow" name="@item.classnum">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                @item.name
                            </div>
                            <div class="aui-list-item-label">
                                @switch (item.classnum)
                                {
                                    case 0:
                                        @:已离岗
                                break;
                                    case 1:
                                        @:外科
                                        break;
                                    case 2:
                                        @:内科
                                        break;
                                    case 3:
                                        @:儿科
                                        break;
                                    case 4:
                                        @:骨科
                                        break;
                                }
                            </div>
                            </div>
                    </li>
                    </a>
            }
            </ul>
            </div>

            <div class="aui-list-item-inner">
                <a href="/Admin/Index"> <p><div class="aui-btn aui-btn-info aui-btn-block aui-btn-outlined">返回主菜单</div></p></a>
            </div>

        </body>
    </html>
    <script>
        function itemclick(num) {
            var l0 = document.getElementsByName('0');
            var l1 = document.getElementsByName('1');
            var l2 = document.getElementsByName('2');
            var l3 = document.getElementsByName('3');
            var l4 = document.getElementsByName('4');
            var i1 = document.getElementById('item1');
            var i2 = document.getElementById('item2');
            var i3 = document.getElementById('item3');
            var i4 = document.getElementById('item4');
            var i5 = document.getElementById('item5');

            switch (num) {

                case 1:
                    i1.className = "aui-tab-item aui-active";
                    i2.className = "aui-tab-item";
                    i3.className = "aui-tab-item";
                    i4.className = "aui-tab-item";
                    i5.className = "aui-tab-item";
                    for (var i = 0; i < l0.length; i++) l0[i].style.display = "block";
                    for (var i = 0; i < l1.length; i++) l1[i].style.display = "block";
                    for (var i = 0; i < l2.length; i++) l2[i].style.display = "block";
                    for (var i = 0; i < l3.length; i++) l3[i].style.display = "block";
                    for (var i = 0; i < l4.length; i++) l4[i].style.display = "block";
                    break;

                case 2:
                    i2.className = "aui-tab-item aui-active";
                    i1.className = "aui-tab-item";
                    i3.className = "aui-tab-item";
                    i4.className = "aui-tab-item";
                    i5.className = "aui-tab-item";
                    for (var i = 0; i < l0.length; i++) l0[i].style.display = "none";
                    for (var i = 0; i < l1.length; i++) l1[i].style.display = "block";
                    for (var i = 0; i < l2.length; i++) l2[i].style.display = "none";
                    for (var i = 0; i < l3.length; i++) l3[i].style.display = "none";
                    for (var i = 0; i < l4.length; i++) l4[i].style.display = "none";
                    break;

                case 3:
                    i3.className = "aui-tab-item aui-active";
                    i1.className = "aui-tab-item";
                    i2.className = "aui-tab-item";
                    i4.className = "aui-tab-item";
                    i5.className = "aui-tab-item";
                    for (var i = 0; i < l0.length; i++) l0[i].style.display = "none";
                    for (var i = 0; i < l1.length; i++) l1[i].style.display = "none";
                    for (var i = 0; i < l2.length; i++) l2[i].style.display = "block";
                    for (var i = 0; i < l3.length; i++) l3[i].style.display = "none";
                    for (var i = 0; i < l4.length; i++) l4[i].style.display = "none";
                    break;

                case 4:
                    i4.className = "aui-tab-item aui-active";
                    i1.className = "aui-tab-item";
                    i2.className = "aui-tab-item";
                    i3.className = "aui-tab-item";
                    i5.className = "aui-tab-item";
                    for (var i = 0; i < l0.length; i++) l0[i].style.display = "none";
                    for (var i = 0; i < l1.length; i++) l1[i].style.display = "none";
                    for (var i = 0; i < l2.length; i++) l2[i].style.display = "none";
                    for (var i = 0; i < l3.length; i++) l3[i].style.display = "block";
                    for (var i = 0; i < l4.length; i++) l4[i].style.display = "none";
                    break;

                case 5:
                    i5.className = "aui-tab-item aui-active";
                    i1.className = "aui-tab-item";
                    i2.className = "aui-tab-item";
                    i3.className = "aui-tab-item";
                    i4.className = "aui-tab-item";
                    for (var i = 0; i < l0.length; i++) l0[i].style.display = "none";
                    for (var i = 0; i < l1.length; i++) l1[i].style.display = "none";
                    for (var i = 0; i < l2.length; i++) l2[i].style.display = "none";
                    for (var i = 0; i < l3.length; i++) l3[i].style.display = "none";
                    for (var i = 0; i < l4.length; i++) l4[i].style.display = "block";
                    break;
            }
        }
    </script>

    <script type="text/javascript" src="~/script/api.js"></script>
    <script type="text/javascript">
        apiready = function () {
            api.setStatusBarStyle({
                style: 'light'
            });
            api.parseTapmode();
            var header = $api.byId('header');
            var headerPos = $api.offset(header);
            var body_h = $api.offset($api.dom('body')).h;
            var header_h = $api.offset($api.byId('header')).h;
            api.openFrame({
                name: 'index_frm',
                url: '~/html/index_frm.html',
                bounces: true,
                rect: {
                    x: 0,
                    y: header_h,
                    w: 'auto',
                    h: 'auto'
                }
            })
        };
        function openClub() {
            var delay = 0;
            if (api.systemType != 'ios') {
                delay = 300;
            }
            api.openWin({
                name: 'club_win',
                url: '~/html/club_win.html',
                bounces: false,
                delay: delay,
                slidBackEnabled: true,
                vScrollBarEnabled: false,
                progress: {
                    type: "page"
                }
            });
        }
        function closeWin() {
            api.closeWin({
            });
        }
    </script>